package com.ichoice.rabbit.server;

import com.ichoice.rabbit.server.service.Login;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author xianrensawang
 * @date 2021/3/11
 */
@RestController
public class TestController {
    @Resource
    private Login login;

    /**
     * 发布消息,通知所有订阅客户端
     */
    @PostMapping("publish")
    public void testPublish() {
        login.fanoutLogin();
    }


    /**
     * 发布消息,通知所有订阅客户端
     */
    @PostMapping("publish/user")
    public void testPublishUser() {
        login.fanoutUser();
    }
}
